package sk.xorty;

import com.google.inject.AbstractModule;
import com.google.inject.name.Names;
import sk.xorty.service.EmailSender;
import sk.xorty.service.PersonLister;
import sk.xorty.service.SpellChecker;
import sk.xorty.service.SpellCheckerProvider;
import sk.xorty.service.impl.DefaultEmailSender;
import sk.xorty.service.impl.InMemoryPersonLister;

public class PersonModule extends AbstractModule {

    @Override
    protected void configure() {
        bind(PersonLister.class).to(InMemoryPersonLister.class);
        bind(EmailSender.class).to(DefaultEmailSender.class);
        bind(SpellChecker.class).toProvider(SpellCheckerProvider.class);
        bind(String.class).annotatedWith(Names.named("spellKey")).toInstance("DE");
    }

}
